package info.touret.winecellar.bottle.client;

import com.google.web.bindery.requestfactory.shared.InstanceRequest;
import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.Service;
import info.touret.winecellar.bottle.shared.TastingProxy;

import java.util.List;

/**
 * Requete des degustations
 * @author touret-a
 *
 */
@Service(info.touret.winecellar.bottle.server.domain.Tasting.class)
public interface TastingRequest extends RequestContext{
	/**
	 * 
	 * @return la liste complete des degustations
	 */
	Request<List<TastingProxy>> findAllTastings();
	/**
	 * Cree un element
	 */
	InstanceRequest<TastingProxy, Void> persist();
	/**
	 * supprime l element
	 */
	InstanceRequest<TastingProxy, Void> remove();
	/**
	 * maj une degustation
	 */
	InstanceRequest<TastingProxy, Void> update();
	/**
	 * ajoute une degustation et maj la quantite des bouteilles presentes en cave
	 */
	InstanceRequest<TastingProxy, Void> addTasting();	
}
